Get_Supported_Voices
Get Supported Voices
This endpoint retrieves the list of supported voices for campaign creation in Toingg.
- Endpoint URL:
GET https://www.toingg.com/api/v3/get_supported_voices
- Headers:
accept: application/json
Example cURL Request
curl -X GET "https://www.toingg.com/api/v3/get_supported_voices" -H "accept: application/json"
Example Code
Python
import requests
url = "https://www.toingg.com/api/v3/get_supported_voices"
headers = {
"accept": "application/json"
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
data = response.json()
print("Supported Voices:", data["result"]["voices"])
else:
print("Error:", response.status_code, response.text)
JavaScript
const axios = require('axios');
const url = 'https://www.toingg.com/api/v3/get_supported_voices';
const headers = {
'accept': 'application/json'
};
axios.get(url, { headers })
.then(response => {
if (response.status === 200) {
console.log('Supported Voices:', response.data.result.voices);
} else {
console.log('Error:', response.status, response.statusText);
}
})
.catch(error => {
console.error('Error:', error);
});
Server Response
Possible Responses
Code | Description |
---|---|
200 | Successful Response |
401 | Unauthorized |
Response Details
200 - Successful Response
- Media type: application/json
- Example Value:
"string"
401 - Unauthorized
- Media type: application/json
- Example Value:
{
"detail": "Not authenticated"
}
This documentation provides detailed information on how to retrieve the supported voices using the Toingg API. Each section includes example code snippets in both Python and JavaScript to help developers integrate these endpoints into their applications.